Skip to content

feat: Implement project enabling/disabling functionality#6363

Open
niladrix719 wants to merge 12 commits intopipe-cd:masterfrom
niladrix719:disable-project#4754
Open

feat: Implement project enabling/disabling functionality#6363
niladrix719 wants to merge 12 commits intopipe-cd:masterfrom
niladrix719:disable-project#4754

Conversation

@niladrix719
Copy link
Copy Markdown
Member

@niladrix719 niladrix719 commented Nov 26, 2025

What this PR does:

  • Adds Disable option in project settings (no new logins or API calls are allowed until it is re-enabled)
  • Adds a Disable and Enable Field in Owner page
Screenshot 2025-11-26 at 9 41 28 PM Screenshot 2025-11-26 at 6 56 37 PM Screenshot 2025-11-26 at 7 59 50 PM Screenshot 2025-11-27 at 2 00 19 AM

Why we need it:

Which issue(s) this PR fixes:

Fixes #4754

Signed-off-by: “niladrix719” <niladrix719@gmail.com>
Signed-off-by: “niladrix719” <niladrix719@gmail.com>
Signed-off-by: “niladrix719” <niladrix719@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.50%. Comparing base (9fdf3c8) to head (48c7ebc).

❗ There is a different number of reports uploaded between BASE (9fdf3c8) and HEAD (48c7ebc). Click for more details.

HEAD has 10 uploads less than BASE
Flag BASE (9fdf3c8) HEAD (48c7ebc)
.-pkg-app-pipedv1-plugin-terraform 1 0
.-pkg-app-pipedv1-plugin-waitapproval 1 0
.-pkg-app-pipedv1-plugin-scriptrun 1 0
.-pkg-app-pipedv1-plugin-wait 1 0
.-pkg-app-pipedv1-plugin-analysis 1 0
.-tool-actions-plan-preview 1 0
.-pkg-plugin-sdk 1 0
.-pkg-app-pipedv1-plugin-kubernetes 1 0
. 1 0
.-pkg-app-pipedv1-plugin-kubernetes_multicluster 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6363       +/-   ##
===========================================
- Coverage   28.82%   17.50%   -11.33%     
===========================================
  Files         560        7      -553     
  Lines       59941      920    -59021     
===========================================
- Hits        17277      161    -17116     
+ Misses      41343      738    -40605     
+ Partials     1321       21     -1300     
Flag Coverage Δ
. ?
.-pkg-app-pipedv1-plugin-analysis ?
.-pkg-app-pipedv1-plugin-kubernetes ?
.-pkg-app-pipedv1-plugin-kubernetes_multicluster ?
.-pkg-app-pipedv1-plugin-scriptrun ?
.-pkg-app-pipedv1-plugin-terraform ?
.-pkg-app-pipedv1-plugin-wait ?
.-pkg-app-pipedv1-plugin-waitapproval ?
.-pkg-plugin-sdk ?
.-tool-actions-gh-release 19.23% <ø> (ø)
.-tool-actions-plan-preview ?
.-tool-codegen-protoc-gen-auth 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

niladrix719 and others added 4 commits November 27, 2025 03:37
Signed-off-by: “niladrix719” <niladrix719@gmail.com>
Signed-off-by: “niladrix719” <niladrix719@gmail.com>
Signed-off-by: “niladrix719” <niladrix719@gmail.com>
@niladrix719
Copy link
Copy Markdown
Member Author

niladrix719 commented Dec 9, 2025

I think we can still merge this PR, since it will trigger publish_tool.yaml to publish a new version of the codegen image. We can then update the Makefile and gen.yaml image in a later PR. What do you think, @khanhtc1202?

Or, we could update the image and use the new one in this PR, but I don’t think I have write access to push a new image version.

@khanhtc1202
Copy link
Copy Markdown
Member

@niladrix719 Since the codegen check is a required step in the CI, I think it's better to fix the broken CI first 👀

@niladrix719
Copy link
Copy Markdown
Member Author

okay can you help me publish the new image, so I can use it here

@khanhtc1202
Copy link
Copy Markdown
Member

@niladrix719 sure, sorry for the missed 🙏

pkg/jwt/jwt.go Outdated

// NewClaims creates a new claims for a given github user.
func NewClaims(githubUserID, avatarURL string, ttl time.Duration, role model.Role) *Claims {
func NewClaims(githubUserID, avatarURL string, ttl time.Duration, role *model.Role) *Claims {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to change this to pointer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just thought it would be better, should I revert this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it should be a separated PR for that, to reduce the change we have in each PR 🙏

zap.String("project", projectID),
)
return nil, fmt.Errorf("project %s is disabled", projectID)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this file change and do it by another PR to resolve the codegen diff 👀

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@khanhtc1202 khanhtc1202 added the priority/P1 Top priority label Jan 13, 2026
Removed logging and error handling for disabled projects.

Signed-off-by: Niladri Adhikary <91966855+niladrix719@users.noreply.github.com>
niladrix719 and others added 2 commits January 14, 2026 11:57
Signed-off-by: “niladrix719” <niladrix719@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 16, 2026
niladrix719 and others added 2 commits February 19, 2026 21:03
Signed-off-by: Niladri Adhikary <niladrix719@gmail.com>
@niladrix719 niladrix719 removed the Stale label Feb 19, 2026
@niladrix719
Copy link
Copy Markdown
Member Author

Hey @khanhtc1202 can you check now

@github-actions
Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to disable project

2 participants